package com.peng.leetcode.trie;

/**
 * TreeNode
 *
 * @author: lupeng6
 * @create: 2021/1/26 14:23
 */
public class TrieNode {

    private TrieNode[] links;

    private final int r = 26;

    private boolean isEnd = false;

    public TrieNode() {
        this.links = new TrieNode[26];
    }

    public boolean containsKey(char c) {
        return links[c - 'a'] != null;
    }


    public TrieNode get(char ch) {
        return links[ch - 'a'];
    }


    public void put(char ch, TrieNode node) {
        links[ch - 'a'] = node;
    }

    public void setEnd() {
        this.isEnd = true;
    }

    public boolean isEnd() {
        return this.isEnd;
    }

    public static void main(String[] args) {
        System.out.println("aa");

    }
}
